////////////////////////////////////////////////////////////////////////////
//
//  Crytek Engine Source File.
//  Copyright (C), Crytek Studios, 2010.
// -------------------------------------------------------------------------
//  File name:   ParticleMemory.h
//  Version:     v1.00
//  Created:     18/03/2010 by Corey Spink
//  Compilers:   Visual Studio.NET
//  Description: All the particle system's specific memory needs
// -------------------------------------------------------------------------
//  History:
//
////////////////////////////////////////////////////////////////////////////

#ifndef __particlememory_h__
#define __particlememory_h__
#pragma once

#include "ParticleList.h"

//////////////////////////////////////////////////////////////////////////
// Specify particle heap allocator.
typedef stl::HeapAllocator<stl::PSyncDebug> CParticleHeapBase;
struct CParticleHeap: CParticleHeapBase
{
	CParticleHeap();
};

typedef stl::StaticPoolCommonAllocator<CParticleHeap> ParticleAllocator;

template<class T>
struct ParticlePoolList: ParticleList<T, ParticleAllocator>
{
	static ParticleAllocator::TPool& ParticlePoolAllocator()
	{
		typedef ParticleList<T,ParticleAllocator> super;
		using_type(super, Node);
		return ParticleAllocator::TypeAllocator<Node>();
	}
};

#endif // __particlememory_h__
	
